Skip to content

Make the workflow work for Perl scripts without a Perl extension.#3063

Open
drgrice1 wants to merge 1 commit into
openwebwork:WeBWorK-2.21from
drgrice1:perltidy-workflow-shebang-check
Open

Make the workflow work for Perl scripts without a Perl extension.#3063
drgrice1 wants to merge 1 commit into
openwebwork:WeBWorK-2.21from
drgrice1:perltidy-workflow-shebang-check

Conversation

@drgrice1

Copy link
Copy Markdown
Member

This works by checking the first line of the file for a perl shebang. That is it checks to see if the first line of a file starts with #! and contains perl after that. Note that only files in bin and bin/dev_scripts that do not have the extension .pl or .pm are checked for the shebang (and not files in a subdirectory of one of those). That is to prevent the workflow and script from becoming much more resource intensive than they already are, and also to skip conf files such as conf/localOverrides.conf.dist that is not currently "tidy".

Both the GitHub workflow and the bin/dev_scripts/run-perltidy.pl script are updated for this.

All of these files were perltidied in a recent pull request, so this ensures that they stay that way.

Also remove the executable bit from bin/addadmin. That is a wwsh script, and not a script that can be directly executed from the shell. So it should not have the executable bit.

Note that this will not be added to the PG repository since it does not have any of these Perl scripts without extensions.

This works by checking the first line of the file for a `perl` shebang.
That is it checks to see if the first line of a file starts with `#!`
and contains `perl` after that. Note that only files in `bin` and
`bin/dev_scripts` that do not have the extension `.pl` or `.pm` are
checked for the shebang (and not files in a subdirectory of one of
those). That is to prevent the workflow and script from becoming much
more resource intensive than they already are, and also to skip `conf`
files such as `conf/localOverrides.conf.dist` that is not currently
"tidy".

Both the GitHub workflow and the `bin/dev_scripts/run-perltidy.pl`
script are updated for this.

All of these files were perltidied in a recent pull request, so this
ensures that they stay that way.

Also remove the executable bit from `bin/addadmin`.  That is a `wwsh`
script, and not a script that can be directly executed from the shell.
So it should not have the executable bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant